<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>APP下载 - 影多多</title>
	<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/>
	<meta http-equiv="Access-Control-Allow-Origin" content="*">
	<meta content="yes" name="apple-mobile-web-app-capable"/>
	<meta content="black" name="apple-mobile-web-app-status-bar-style"/>
	<meta content="telephone=no" name="format-detection"/>
	<link rel="stylesheet" href="/public/download/css/public.min.css" />
	<link rel="stylesheet" href="/public/download/css/style.min.css" />
	<style type="text/css">
        .sp-content{
	      background: url('/public/static/assets/images/sharebg.png');
	      height: 100%;
	      background-size: 100% 100%;
	    }
	    .share-box{
	      position: absolute;
	      left: 5%;
	      bottom:2em;
	      border-radius: 0.3em;
	      width: 90%;
	      /*height: 9em;*/
	      background: #fff;
	    }
	    .share-ma{
	      font-size: 1em;
	      line-height: 3em;
	      text-align: center;
	      width: 40%;
	      float: right;
	      padding-top: 10%;
	    }
	    .share-ma span{
	    	display: block;
	    }
	    .share-ma-img{
	      width: 56%;
	      margin: auto;
	      padding: 2%;
	      float: left;
	    }
	    .text-label{
	      text-align: center;
	      display: block;
	      font-size: 1em;
	      line-height: 2em;
	    }
	    .share-btn{
	      margin: 0.5em auto;
	      width: 80%;
	    }
	    .share-btn-item{
	      float: left;
	      width: 50%;
	      text-align: center;
	    }
	    .share-btn-item img{
	      width: 2em;
	      margin: auto;
	    }
	</style>
</head>
<body>
	<div class="sp-content" id="html2canvas">
    <div class="share-box">
      <div class="share-ma">
        <span>我的邀请码</span>
        <span id="share_ma">{$share_ma}</span>
        <span>长按识别二维码</span>
      </div>
      <div class="share-ma-img" id="share">
        <img src="/login/apppage/getimg?share_ma={$share_ma}"/>
      </div>
    </div>
  </div>
	<div class="poster ovf">
	    <img src="" alt="">
	</div>
	<div class="poster-tip ovf">长按保存图片，将本条快讯推荐给好友</div>
</body>
<script src="/public/static/assets/js/jquery-1.8.3.min.js"></script>
<script src="/public/static/assets/js/html2canvas.min.js"></script>
<script type="text/javascript">
	$(function() {
		make_image();
	})
	function make_image()
    {
        // var headerH=$('.header').outerHeight(true);
        // var footerH=$('.footer').outerHeight(true);
        // var mainH=$('.main').outerHeight(true);
        // var winH=$(window).height();
        // var prtH=$('.box .prt').outerHeight(true);
        // var tilH=$('.box .article .title').outerHeight(true);
        // var sharesH=$('.box .shares').outerHeight(true);
        // var context = $('.box .article .context');
        // if(winH > headerH + footerH + mainH + 40){
        //     context.css('height',winH - headerH - footerH - 40 - 50 - prtH - tilH - sharesH - 15);
        // }else{
            // context.css('height','auto');
        // }
        var width = $('#html2canvas').outerWidth(true);
        var height = $('#html2canvas').outerHeight(true);
        console.log(width+' - '+height);

        html2canvas($('#html2canvas')[0], {dpi:10000,scale:3,logging:false,useCORS:true}).then(function(canvas) {
            var imgUrl = canvas.toDataURL();
            $('.poster img').attr('src',imgUrl);
            $('.sp-content').hide();
        });
    }
</script>
</html>